package com.wh.accesscontrol.service.lmpl;

import com.wh.accesscontrol.dao.EmployeeMapper;
import com.wh.accesscontrol.entity.Employee;
import com.wh.accesscontrol.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("EmployeeServiceImpi")
public class EmployeeServiceImpl implements EmployeeService {
    @Autowired
    private EmployeeMapper employeeMapper;
    @Override
    public boolean add(Employee employee) {
        if (employeeMapper.insert(employee)==1){
            return true;
        }
        return false;
    }

    @Override
    public Employee findByNumber(int id) {
        return employeeMapper.findByNumber(id);
    }

}
